fix(sdk-coin-ada): align isUnsignedSweep in recoverConsolidations with recover#9118
Draft
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Draft
fix(sdk-coin-ada): align isUnsignedSweep in recoverConsolidations with recover#9118bitgo-ai-agent-dev[bot] wants to merge 1 commit into
bitgo-ai-agent-dev[bot] wants to merge 1 commit into
Conversation
…h recover recoverConsolidations was checking !userKey && !backupKey && !walletPassphrase to determine whether to treat results as unsigned sweep, while recover() uses only !walletPassphrase. This mismatch meant that providing userKey/backupKey without walletPassphrase would cause recoverConsolidations to expect MPCTx but receive MPCSweepTxs from recover(), silently mangling the return value. Align recoverConsolidations to use !walletPassphrase exclusively, matching the semantics established in recover(). Ticket: COINS-557 Session-Id: c754900c-a984-4fd8-baf3-5fca5a865e3b Task-Id: f9217dca-41de-4d55-a229-617279774136
35cde43 to
e6ff565
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
recoverConsolidations()to use!walletPassphraseas the sole signal for unsigned sweep, matching the logic already inrecover()Why
recover()determinesisUnsignedSweepusing only!params.walletPassphrase, whilerecoverConsolidations()still used the older!params.userKey && !params.backupKey && !params.walletPassphraseuserKey/backupKeywithoutwalletPassphrasecausedrecover()to return an unsignedMPCSweepTxs, butrecoverConsolidations()expected a signedMPCTx, silently mangling the returned objectwalletPassphrasemeans unsigned sweepTest plan
should treat as unsigned sweep when walletPassphrase is absent even if keys are provided— passesuserKey+backupKeywithoutwalletPassphraseand asserts the result hastxRequests(unsigned shape)sdk-coin-adaunit tests pass (168 passing)Ticket: COINS-557